import MySQLdb

db=MySQLdb.connect('localhost','ken','ken0417','test')
cursor=db.cursor()
cursor.execute('select version()')
data=cursor.fetchone()
print('DB version: %s'%data)


